<%@page import="java.util.ArrayList"%>
<%@page import="com.cmy.www.UserMas"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>selectShow</title>
	</head>
	<body>
			<table align="center" border="2px">
				<tr>
					<td>编号</td>
					<td>姓名</td>
					<td>性别</td>
					<td>出生年月</td>
					<td>联系方式</td>
					<td>地址</td>
				</tr>
<!-- 			数据传入 -->
				<%
				 	UserMas user = null; 
					ArrayList<UserMas> list = (ArrayList<UserMas>)request.getAttribute("list");
				 	for(int i=0; i<list.size(); i++){
						user = list.get(i);
					
				%>
				<tr>
					<td><%=user.getId()%></td>
					<td><%=user.getName()%></td>
					<td><%=user.getSex()%></td>
					<td><%=user.getBirth()%></td>
					<td><%=user.getPhoneNumber()%></td>
					<td><%=user.getAddress()%></td>
					<td>
						<a href="<%=request.getContextPath()%>/AddressBookServlet?method=del&delID=<%=user.getId()%>">删除</a>
					</td>
					<td>
						<a href="http://localhost:8080/AddressBookFile/updatePanel.jsp?upID=<%=user.getId()%>&upName=<%=user.getName()%>&upSex=<%=user.getSex()%>&upBirth=<%=user.getBirth()%>&upPhone=<%=user.getPhoneNumber()%>&upAddress=<%=user.getAddress()%>">修改</a>
<%-- 						<a href="<%=request.getContextPath()%>/AddressBookServlet?method=update&upID=<%=user.getId()%>&upName=<%=user.getName()%>&upSex=<%=user.getSex()%>&upBirth=<%=user.getBirth()%>&upPhone=<%=user.getPhoneNumber()%>&upAddress=<%=user.getAddress()%>">修改</a> --%>
					</td>
				</tr>
				<%
				 	}
				%>
				
			</table>
	</body>
</html>